      package com.pingan.internal.point.shopping.common.enums;

import com.google.common.collect.Lists;

import java.util.List;

public enum ProvinceEnum {
    C_11("北京", "11"),
    C_12("天津", "12"),
    C_13("河北", "13"),
    C_14("山西", "14"),
    C_15("内蒙古", "15"),
    C_21("辽宁", "21"),
    C_22("吉林", "22"),
    C_23("黑龙江", "23"),
    C_31("上海", "31"),
    C_32("江苏", "32"),
    C_33("浙江", "33"),
    C_34("安徽", "34"),
    C_35("福建", "35"),
    C_36("江西", "36"),
    C_37("山东", "37"),
    C_41("河南", "41"),
    C_42("湖北", "42"),
    C_43("湖南", "43"),
    C_44("广东", "44"),
    C_45("广西", "45"),
    C_46("海南", "46"),
    C_50("重庆", "50"),
    C_51("四川", "51"),
    C_52("贵州", "52"),
    C_53("云南", "53"),
    C_54("西藏", "54"),
    C_61("陕西", "61"),
    C_62("甘肃", "62"),
    C_63("青海", "63"),
    C_64("宁夏", "64"),
    C_65("新疆", "65"),
    ;

    private String name;
    private String code;

    public String getName() {
        return name;
    }
    public String getCode() {
        return code;
    }

    public static List<Code> getProvince() {
        return province;
    }

    ProvinceEnum(String name, String code) {
        this.name = name;
        this.code = code;
    }

    private static final List<Code> province = Lists.newArrayList();

    static{
        for (ProvinceEnum e:ProvinceEnum.values()) {
            Code code = new Code();
            code.setCode(e.getCode());
            code.setName(e.getName());
            province.add(code);
        }

    }
}
